
#ifndef _GAMESTATE_H
#define _GAMESTATE_H

#include "Texture.h"
#include "Surface.h"
//#include "Map.h"
//#include "Sprite.h"
#include <vector>
using namespace std;

enum Game_State
{
	_Play_State = 1,
	_Menu_State = 0,
	_MapEditor_State  = 2,
	_BeginPlay_State = 3,
	_LayTam_State = 4,
	_EditorRun_State = 5,
	_Pause_State = 6,
	_Save_State = 7,
	_Load_State = 8,
	_Hepl_Sate = 9,
	_Exit_State = -1
};
class GameState
{
protected:
	GameState *_OldState;			//state truoc do co the quay ve
	bool _CloseState;				// = true --> xoa state
	Game_State _NextState;			//state tiep theo

	SURFACE *_Background;			// backdround
	LPDIRECT3DSURFACE9 _Backbuffer;		//back buffer
public:

	GameState();
	~GameState();
	
	bool GetCloseState();
	void SetCloseState(bool);
	Game_State GetNextState();
	void SetNextState(Game_State);

	GameState* GetOldState();
	void SetOldState(GameState*);

	virtual	void update()=0;
	virtual void Input_update()=0;
	virtual void Screen_Update()=0;
	virtual void Clear_Screen()=0;
	virtual void Draw()=0;
	virtual void End()=0;


};



#endif